package pt.ipleiria.estg.dei.ei.es2.bio;

import android.content.Context;
import android.preference.EditTextPreference;
import android.util.AttributeSet;

/**
 * Created by Ricardo on 12/03/2015.
 */
public class MyEditTextPreferences extends EditTextPreference {

    public MyEditTextPreferences(Context context, AttributeSet attrs){
        super(context,attrs);

    }
    @Override
    protected void onDialogClosed(boolean positiveResult){
        super.onDialogClosed(positiveResult);
        if(positiveResult)
            setSummary(getSummary());
    }

    @Override
    public CharSequence getSummary(){
        return getText();
    }
}
